<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ include file="edocHeader.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>上卡设置</title>
<html:link renderURL='/edocForm.do' var='edocForm' />

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

</head>
<script type="text/javascript">
var menuKey = "1508";
//是否是单位公文管理员
var isAccountAdmin = ${v3x:isRole("AccountEdocAdmin", v3x:currentUser())};
if(isAccountAdmin){
    menuKey = "208"
}
getA8Top().showLocation(menuKey,"上卡设置");
function confirmthisform(){
	var shangkaSel = document.getElementById("shangkaId");
	if(shangkaSel.value == ""){
		alert("请选择上卡文单！");
		return;
	}
	
	var form = document.all("submitform");
	form.action = "${edocForm}?method=saveShangKaSet";
	form.submit();
}
var mainURL = "<html:link renderURL='/main.do'/>";
function cancelthisform(){
 document.location.reload();
}

<c:choose>		 
	<c:when test="${operateResult}">
		alert("保存成功！");
	</c:when>
	<c:when test="${!operateResult && operateResult != null}">
		alert("保存失败，请选择上卡文单！");
	</c:when>
</c:choose>
</script>
<body>
<form name="submitform" method="post">
<table width="100%" height="100%" align="center" border="0" cellpadding="0" cellspacing="0" class="categorySet">
	<tr>
		<td colspan="3" width="100%" height="30">
			<table width="100%" border="0" cellpadding="0" cellspacing="0">
			     <tr class="page2-header-line" height="60">
			     <!--
			        <td width="80" height="60"></td>
			        <td class="page2-header-bg"><fmt:message key='menu.edoc.edocSwitchSet.label'/></td>
			        <td class="page2-header-line">&nbsp;</td>
			       -->
				</tr>
			</table>
		</td>
	</tr>
  <tr>
  	<td width="15%"></td>
	<td width="70%" align="center">
		<div class="scrollList">
		<div style="padding:20px">	
			<fieldset width="50%"><legend>上卡设置</legend>
			<table width="100%" cellpadding="4" cellspacing="6" >
				  <tr>
				  	  <td>
				  	  	  请选择上卡的默认文单：
				  	  </td>
					  <td width="60%"  nowrap>
						  <select id="shangkaId" name="shangkaId">
						  		<option value="">--请选择--</option>
						  		<c:forEach items="${list}" var="edocForm">
						  			<option value="${edocForm.id}" <c:if test="${shangkaId eq edocForm.id}">selected='selected'</c:if>>${edocForm.name}</option>
						  		</c:forEach>
						  </select>
					  </td>
				  </tr>
			</table>
			</fieldset>	
		</div>
		</div>
	</td>
	<td width="15%"></td>
  </tr>
	<tr>
		<td height="42" align="center" class="bg-advance-bottom" colspan="3"> 
	  	<input name="Input3" type="button" class="button-default-2" value="<fmt:message key="common.button.ok.label" bundle='${v3xCommonI18N}' />" onclick="confirmthisform()">&nbsp;
	    <input name="Input2" type="button"  class="button-default-2" value="<fmt:message key="systemswitch.cancel.lable" bundle="${v3xMainI18N}"/>" onclick="cancelthisform()">&nbsp;   
	  </td>
  </tr>
</table>
</form>
</body>
</html>
